# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

_author=GAAS
_perlmod=Digest-MD2
pkgname=perl-digest-md2
pkgver=2.04
pkgrel=17
pkgdesc='Perl interface to the MD2 Algorithm.'
arch=('x86_64' 'aarch64')
url='https://metacpan.org/release/Digest-MD2'
license=('GPL' 'PerlArtistic')
depends=('perl' 'gmp')
options=(!emptydirs)
source=("http://cpan.perl.org/modules/by-authors/id/G/GA/$_author/$_perlmod-$pkgver.tar.gz")
sha512sums=('780ee79830fe8fcb3a844f67517c90d49a1e5e869dc8efd208d3eb73ccf6e56d3d112fcbd1effa083c4d77e5bddaab096b8aff9528707b235287761622b80433')

build() {
  cd "$_perlmod-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd "$_perlmod-$pkgver"

  make install DESTDIR="$pkgdir"
}

